package com.cos.bussiness.domain.bo;

import com.cos.common.core.domain.BaseEntity;
import com.cos.common.core.validate.AddGroup;
import com.cos.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 【请填写功能名称】业务对象 project
 *
 * @author cos
 * @date 2024-06-06
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class ProjectBo extends BaseEntity {

    /**
     * 主键id
     */
    private Long id;

    /**
     * 项目名称
     */
    @NotBlank(message = "项目名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 开始时间
     */
    @NotNull(message = "开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date startTime;

    /**
     * 交付时间
     */
    @NotNull(message = "交付时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date deliveryTime;

    /**
     * 类型
     */
    private String type;

    /**
     * 归属部门
     */
    private String fkDeptId;

    /**
     * 项目状态
     */
    private String status;

    /**
     * 项目地址
     */
    private String address;

    //生成内置表名
    public static String getTableName(){
        return "project";
    }

    @Override
    public String getTable(){
        return getTableName();
    }

    @Override
    public Long getBaseId() {
        return getId();
    }

}
